{% extends "base.html" %}
{% load nav_extras %}
{% block header%}
<script type="text/javascript">
	var myCalendar;
	function doOnLoad() {
		myCalendar = new dhtmlXCalendarObject([ "dt1", "dt2" ]);
		myCalendar.loadUserLanguage('cn');
	}
</script>
{% endblock%} {% block content %}
<div class="pageContent">
  <div class="panelBar">
    <ul class="toolBar">
      <li><a class="add" href="/admin/workday/create">添加工作日</a></li>
    </ul>
  </div>
  <div class="pageHeader">
    <form action="{{full_path}}" method="post">
      <div class="searchBar">
        {% csrf_token %} 起始日期：<input type="text" id="dt1" name="dt1" value="{{dt1|date:'Y-m-d'}}" /> 终止日期：<input type="text"
          id="dt2" name="dt2" value="{{dt2|date:'Y-m-d'}}" /> <input type="submit" value="检索" />
      </div>
    </form>
  </div>
  <table class="dhtmlxGrid" gridHeight="auto" name="grid2" imgpath="/static/js/codebase/imgs/" width="98%" lightnavigation="true">
    <tr>
      <td type="ro">ID</td>
      <td type="ro">开始时间</td>
      <td type="ro">结束时间</td>
      <td type="ro">描述</td>
      <td type="ro">操作</td>
    </tr>
    {%for workday in list.object_list%}
    <tr>
      <td>{{workday.id}}</td>
      <td>{{workday.at_date|date:"Y-m-d"}}</td>
      <td>{{workday.memo}}</td>
      <td><a href="/admin/workday/delete/{{workday.id}}" title="确定要删除吗?">删除</a></td>
    </tr>
    {%endfor%}
  </table>
</div>
<div class="pagination">
  {% paging_nav nav_url pn pc %} 
  </div>
{% endblock %}
